<?php

//parametrii conectare baza de date
$adresa_db = "localhost";
$utilizator_db = "swar";
$parola_db = "";
$db = mysql_connect($adresa_db, $utilizator_db, $parola_db) or die("Nu se poate conecta la baza de date !");
mysql_select_db("swar_db", $db);

function addentities($data){
   if(trim($data) != ''){
   $data = htmlentities($data, ENT_QUOTES);
   return str_replace('\\', '&#92;', $data);
   } else return $data;
}

?>